import numpy as np
import matplotlib.pyplot as plt
from scipy import interpolate

x=np.array([1,3,5,7,9,11,13])
y=np.sin(x)
plt.scatter(x,y)
#plt.show()
xnew=np.linspace(1.0,13.0,500)
ynewLinear=interpolate.spline(x,y,xnew,order=1)
print(ynewLinear[:5])
ynewReal=np.sin(xnew)
print(ynewReal[:5])

plt.plot(xnew,ynewLinear)
plt.plot(xnew,ynewReal)
plt.show()